<!DOCTYPE html>
<html class="x-admin-sm">
    
    <head>
        {include file="common/head" /}
    </head>

    <body>
    {include file="common/bread" /}
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">

                        <div class="layui-tab layui-tab-brief" lay-filter="set">
                            <ul class="layui-tab-title" id="items">
                                {volist name='menu' id='vo' key='k'}
                                <li {eq name='k' value='1'}class="layui-this"{/eq} onclick="getOption({$k})">{$vo}</li>
                                {/volist}
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show" id="html">

                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <script>
          layui.use(['form'], function(){
            form = layui.form;


          });
          getOption(1);
          function getOption(id) {
              $.ajax({
                  type: "POST",
                  url: "{:url('ajax_option')}",
                  data: {cat_id:id},
                  dataType:'html',
                  success: function (result) {
                      $("#html").html(result);
                  },
                  error: function(data) {
                      layer.msg(data.msg,{icon:2,time:1000});
                  }

              });
          }
        </script>
    </body>
</html>
